package com.ruoyi.project.constant.statuEnum;

/**
 * @program: lvhang
 * @description: 支付方式
 * @author: Mr.Wang
 * @create: 2020-06-19 14:13
 **/
public enum PayType {

    YUE(0,"余额"),
    WX(1,"微信");

    private final Integer code;
    private final String info;

    PayType(Integer code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public Integer getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static String getValue(Integer code) {
        for (PayType ele : values()) {
            if(ele.getCode() == code) return ele.getInfo();
        }
        return null;
    }

}
